﻿
namespace ArienToolkit.Serializer
{
    public interface ISerializer
    {
        /// <summary>
        /// 执行序列化操作
        /// </summary>
        /// <typeparam name="T">序列化对象的类型</typeparam>
        /// <param name="obj">需要执行序列化的对象</param>
        /// <param name="filePath">序列化目标文件</param>
        /// <returns>操作结果</returns>
        bool Serialize<T>(object obj, string filePath);

        /// <summary>
        /// 执行反序列化操作
        /// </summary>
        /// <typeparam name="T">序列化对象的类型</typeparam>
        /// <param name="filePath">序列化目标文件</param>
        /// <returns></returns>
        T DeSerialize<T>(string filePath);
    }
}
